package com.ecoolex.chinadutyfree.retailer.core.dao;

import org.apache.ibatis.annotations.Param;

import com.ecoolex.chinadutyfree.retailer.core.mapper.DirectMailGoodsProductMapper;
import com.ecoolex.chinadutyfree.retailer.entity.DirectMailGoodsProductExample;

public interface DirectMailGoodsProductDAO extends DirectMailGoodsProductMapper {
	
	Long sumStockNumberByExample(DirectMailGoodsProductExample example);

	Long sumUsedStockNumberByExample(DirectMailGoodsProductExample example);

	Long sumSoldNumberByExample(DirectMailGoodsProductExample example);

	int addUsedStockNumber(@Param("directMailGoodsProductId") Integer directMailGoodsProductId, @Param("buyNumber") Integer buyNumber, @Param("updateUser") String updateUser);

	int subtractUsedStockNumber(@Param("directMailGoodsProductId") Integer directMailGoodsProductId, @Param("buyNumber") Integer buyNumber, @Param("updateUser") String updateUser);

	int addSoldNumber(@Param("directMailGoodsProductId") Integer directMailGoodsProductId, @Param("buyNumber") Integer buyNumber, @Param("updateUser") String updateUser);
}